<template>
	<view class="test-issuer">
		<view class="test-issuer-herd"> </view>
		<view class="test-issuer-cengter">
			<view class="test-issuer-cengter-ab">
				<view class="engter-ab-image">
					<image :src="userinfo.avatar" mode=""></image>
				</view>
				<view class="cengter-ab-zhanwe"> </view>
				<uni-notice-bar :text="noticText"></uni-notice-bar>
				<fy-picker class="fy-picker" :show-bar="false" mode="multiSelector" v-model="data2Value" :range="range2" @confirm="onconfirm2">
					<!-- <view class="form-item-content">{{ data2Text ? data2Text : '请选择' }}</view> -->
				</fy-picker>
				<button class="but-1" @click="goToTest" type="primary">开始记忆</button>
				<button class="but-2" @click="goToClass" type="primary">我再去复习一下</button>
			</view>
		</view>
		
	</view>
</template>

<script>
	import { mapState } from "vuex"
	export default {
		data() {
			return {
				data2Value: [],
				type: '',
				count: '',
				range2: [["全部","单选题","多选题","简答题"], ["10题","20题","30题","50题","80题","100题"]],
				noticText:'全力以赴  不负韶华',
			};
		},
		computed: {
			...mapState(['userinfo'])
		},
		onLoad(res) {
			this.mys=res.type
			uni.setNavigationBarTitle({
				title: res.type + "记忆"
			})
			// this.get_test()
		},
		methods:{
			onconfirm2(e) {
				let arr = (e.text).split('-')
				this.type = arr[0];
				this.count = arr[1];
				// console.log(this.type,this.count);
			},
			goToTest(){
				uni.navigateTo({
					url:'../../views/test-conut/test-conut?type='+this.type+'&count='+this.count+'&mys='+this.mys
					// url:'../../views/test-issuer/test-issuer?type='+type
				})
			},
			goToClass(){
				uni.switchTab({
					url:'../../tabBar/Classify/Classify'
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.test-issuer{
		.test-issuer-herd{
			background: $my-bg-color;
			height: 150px;
		}
		.test-issuer-cengter{
			position: relative;
			
			.test-issuer-cengter-ab{
				position: absolute;
				background-color: #fff;
				border-radius: 15px;
				height: 430px;
				top: -70px;
				left: 25px;
				right: 25px;
				box-shadow: 0px 5px 15px 0px rgba($color: #000000, $alpha: 0.3);
				// overflow: hidden;
				box-sizing: border-box;
				.fy-picker{
					border-top: 1px solid #f0f0f0;
					border-bottom: 1px solid #f0f0f0;
				}
				button{
					margin: 10px 20px;
					border-radius: 50px;
					background: $my-bg-color ;
					outline: none !important;
				}
				.but-1{
					margin-top: 30px;
				}
				.but-2{
					color: $my-bg-color;
					border: 1px solid $my-bg-color;
					background: #fff;
				}
				.engter-ab-image{
					border: 5px solid #fff;
					box-sizing: border-box;
					height: 90px;
					width: 90px;
					border-radius: 50%;
					background-color: $my-bg-color;
					position: absolute;
					top: -50px;
					left: 50%;
					transform: translateX(-50%);
					z-index: 99;
					image{
						width: 100%;
						height: 100%;
					}
				}
				.cengter-ab-zhanwe{
					height: 50px;
				}
			}
		}
	}
</style>
